﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Studio77.GuessLyric.Pages;
using Studio77.GuessLyric.Core;

namespace Studio77.GuessLyric.Views
{
    public partial class DaanItem : UserControl
    {
        bool isContent = false;

        public DaanItem()
        {
            InitializeComponent();
            this.btnContent.Click += btnContent_Click;
        }

        public void SetContent(string content)
        {
            this.btnContent.Content = content;
            isContent = true;
        }

        void btnContent_Click(object sender, RoutedEventArgs e)
        {
            SoundManager.PlayEffect(SoundManager.cancel);
            if (isContent)
            {
                //清除内容
                this.btnContent.Content = string.Empty;
                GamePage.Instance.ClearOneChar(this);
                isContent = false;
            }
        }
    }
}
